home *** CD-ROM | disk | FTP | other *** search
/ Especial Multimedia / Especial Multimedia.iso / Multimed / Herra / TIMWIN.ZIP / DISTORT.CMD < prev    next >
OS/2 REXX Batch file  |  1993-09-22  |  1KB  |  52 lines

  1. ;distort  --  demonstrates geometric operations using general TIM routines
  2. ;expects:     image in a, LUTs initialized by '*ini*
  3. ;*********************************
  4. #include timdefs.h
  5.  
  6. parms
  7.   int windis
  8. endparms
  9.  
  10. int err
  11. float fx1 = 99.0
  12. float fy1 = 11.0
  13. float fx2 = 222.0
  14. float fy2 = 22.0
  15. float xstep = 1.0001
  16. float ystep = 1.1
  17. ibuf er
  18. era x
  19. cls
  20. dest q
  21. show q
  22. cstr a 
  23. era 1
  24. *windispl h (windis+WINLUT1)
  25. dest p
  26. copy q s
  27. *selut 3
  28. ;err = chk lut 2 3
  29. int lno = 0
  30. dis q
  31. drln q fy1 fx1 fy2 fx2 red
  32. while lno < 158
  33.   rdln s fy1 fx1 fy2 fx2        ;get pixels along line
  34.   ihis p lno                     ;write into p (in line)
  35.   bgm q red fy1 fx1                ;write single dot into q
  36.   bgm q red fy2 fx2
  37.   drln r fy1 fx1 fy2 fx2 red       ;draw line in other image for control
  38.   fy1 += ystep
  39.   fy2 += ystep
  40.   xstep *= 1.005
  41.   fx1 = fx1 + 1 - xstep
  42.   fx2 = fx2 + 1 - xstep
  43.   lno += 1
  44. endw
  45. drln q fy1 fx1 fy2 fx2 red
  46. dest q
  47. *windispl h (windis+WINLUT3+BITCOPY1)
  48. dest p
  49. *windispl i windis
  50. stop
  51. 
  52.